home *** CD-ROM | disk | FTP | other *** search
- # Script "findfile" used to send an email search request to an archie server #
- #
- # The syntax is:
- # findfile string
- # replace string with the file name (or substring) to find.
- #
- # Test to see if there is a passed parameter
- #
- if test -z "$1"
- then # There is no passed parameter
- echo
- echo "The syntax for this script is:"
- echo " find <search-string>"
- echo "replacing <search-string> (without the <>) with"
- echo "a string, or substring, that is the name of the"
- echo "file you are trying to locate"
- echo
- else # There is a passed parameter
- # Create a file archie.tmp and write the following five string
- echo "set search sub" > archie.tmp
- echo "set output_format terse" >> archie.tmp
- echo "set sortby rfilename" >> archie.tmp
- echo "set maxhits 200" >> archie.tmp
- echo 'find' $1 >> archie.tmp # Write string with passed parameter
- echo "quit" >> archie.tmp
- # Mail file archie.tmp to archie server
- # Substitute your favorite archie server below
- #
- mail archie@archie.rutgers.edu < archie.tmp
- rm archie.tmp # Delete file archie.tmp
- fi # end if
-
-
-
-
-
-
-
-
-
-
-
-
-